﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kkc.Common
{
    public interface IIocContainer
    {
        object Resolve(Type type);

        object Resolve(Type type, string name);

        T Resolve<T>();

        T Resolve<T>(string name);

        IEnumerable<T> ResolveAll<T>();

        IEnumerable<object> ResolveAll(Type type);

        void Teardown(object instance);

        void RegisterType<TFrom, TTo>()
            where TTo: TFrom;

        void RegisterType<TFrom, TTo>(string name)
            where TTo: TFrom;

        void RegisterType(Type from, Type to);

        void RegisterType(Type from, Type to, string name);

        void RegisterInstance<T>(T instance);

        void RegisterInstance<T>(T instance, string name);


    }
}
